home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / debuging.arc / ERRMON.DOC < prev    next >
Text File  |  1988-04-11  |  7KB  |  155 lines

  1.                                     ERRMON
  2.  
  3.                               By Robert J. Newton
  4.  
  5.        After experiencing a variety of problems with the hard disk on
  6.        my AT, I decided that I wanted a more informative report of disk
  7.        I/O errors than that provided by DOS.  ERRMON is the result.
  8.  
  9.        ERRMON is a resident program which inserts itself in the INT 13
  10.        chain.  It then sits quietly watching for any error condition
  11.        returned by the disk driver.  When an error is detected, it
  12.        springs to life and prints an error message on the screen.  This
  13.        message is in most cases far more informative than that provided
  14.        by DOS.  It then gracefully returns to the caller to let it do
  15.        what it wishes with the error.
  16.  
  17.        Under the proper conditions ERRMON will let you know when DOS is
  18.        making retries.  However, ERRMON does not scroll the screen.
  19.        This means that it is possible that a second message will overlay
  20.        the first and you would not be aware of the retry unless the
  21.        calling program causes a scroll.
  22.  
  23.        A word of caution.  ERRMON has been written to respond to the
  24.        error codes returned by the IBM BIOS disk drivers on the PC, XT
  25.        and AT as shown in the various BIOS listings.  Results with
  26.        other drivers are totally unknown although it might be assumed
  27.        that they map their error codes the same in order to achieve
  28.        compatibility.  There are no checks for machine or drive type.
  29.  
  30.        In addition, the errors defined for the PC/XT and AT fixed disk
  31.        drivers are not the same in all cases.  ERRMON responds to the
  32.        codes for both.  It is possible, but not likely, that say the AT
  33.        could through some glitch return an error code that is not
  34.        defined on the AT, but is on the XT.  Instead of displaying an
  35.        "Undefined error" message, ERRMON would display the message
  36.        defined for the XT.  This possibility was considered so remote
  37.        that it was not trapped.
  38.  
  39.        The only error that ERRMON does not respond to is applicable
  40.        only to the AT.  Its floppy disk driver reports an error when a
  41.        disk is changed.  This is not a true i/o error and is ignored by
  42.        ERRMON.
  43.  
  44.        ERRMON's overhead is essentially nil, only four instructions
  45.        when there is no error.  Approximately 1K of memory will be used,
  46.        mostly for the message text.
  47.  
  48.        The video attribute for the error messages has been set to 0F,
  49.        intense white.  The messages will print in the lower right
  50.        corner of the screen.  You may change both of these by using
  51.        DEBUG.  The attribute byte is at offset 02EE and the screen line
  52.        is at offset 02E2.  Note that the screen line is relative to 0
  53.  
  54.                                        1
  55.  
  56.  
  57.  
  58.  
  59.  
  60.        so that the last line is hex 18, decimal 24.  For those with
  61.        MASM, you may change the EQUATEs at the beginning.  You may also
  62.        change the message text, perhaps to shorten it so that less
  63.        memory will be needed.
  64.  
  65.        Installation is simple, just type errmon.  A successful
  66.        installation will return ERRORLEVEL 0, unsuccessful will return
  67.        255.  It can be installed by an AUTOEXEC.BAT, preferably after
  68.        anything else which might place itself in the INT 13 chain.  You
  69.        can use >nul to avoid the sign on message.
  70.  
  71.  
  72.  
  73.                                 Error messages
  74.  
  75.        Sense failure (PC/XT only)
  76.  
  77.        Status error (AT only) - The controller status register returned
  78.        an error condition, but the error register did not contain an
  79.        error code.
  80.  
  81.        Write fault (AT only) - Indicates a hardware problem with the
  82.        drive.
  83.  
  84.        Undefined error - An error code was returned for which BIOS has
  85.        not defined an error.
  86.  
  87.        Drive not ready (AT only)
  88.  
  89.        No response - What DOS calls Drive not ready.
  90.  
  91.        Seek failure - An attempt to seek to the requested track was
  92.        unsuccessful.
  93.  
  94.        Controller failure - Probably indicates that the controller could
  95.        not successfully complete the requested command within the
  96.        alloted time.
  97.  
  98.        EEC corrected data error - An information report that the
  99.        controller's EEC algorithm successfully corrected a soft data
  100.        error.  You should copy the file and delete the original if this
  101.        happens frequently.
  102.  
  103.        Bad CRC/EEC on read - The sector could not be successfully read.
  104.        Retries should be made and if successful the file should be
  105.        rewritten or copied which will usually cure the situation.
  106.        Otherwise, use RECOVER.
  107.  
  108.        Bad track (PC/XT only) - An operation was attempted on a track
  109.        flagged bad by the low level formatter.  Such areas should have
  110.        been marked bad in the FAT.
  111.  
  112.  
  113.                                        2
  114.  
  115.  
  116.  
  117.  
  118.  
  119.        Bad sector (AT only) - Similar to Bad track.
  120.  
  121.        Data crosses DMA boundary - This indicates a software problem;
  122.        DMA cannot operate with more than 64K of data.
  123.  
  124.        DMA overrun - The controller could not get DMA access; a retry
  125.        should succeed.
  126.  
  127.        Drive init failure - Probably indicates an attempt to initialize
  128.        an invalid drive number.
  129.  
  130.        Drive reset failure - An attempt to reset the drive system
  131.        failed.
  132.  
  133.        Sector not found - Bad news.  The requested sector could not be
  134.        found.  Assuming the values were valid, this indicates a flawed
  135.        disk.  Absent a very capable disk zapper and the knowledge of its
  136.        use, the only cure is a low level format.  It is also possible
  137.        that a disk made in one drive cannot be read in another because
  138.        one of them is out of alignment.
  139.  
  140.        Diskette write protected - Take the tab off.  If there is no tab
  141.        the drive's sensors are probably bad.
  142.  
  143.        Address mark not found - Very bad news.  See sector not found.
  144.  
  145.        Bad controller command - An invalid command was sent to the
  146.        controller.
  147.  
  148.  
  149.        ERRMON is (C) Copyright 1985 by Robert J. Newton, but hereby
  150.        released to the public domain for private non-commercial use.  It
  151.        may be freely copied and distributed, but no consideration may be
  152.        requested other than any customary handling fees charged by
  153.        recognized user's groups.  No warranties of any kind are provided
  154.        and by using the program the user assumes all risk.
  155.